package edu.gdkm.dao;

import edu.gdkm.pojo.Classes;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

public interface IClassesDao {
    @Select("select * from tab_classes where cid=#{id}")
    @Results({
            @Result(property = "cid",column = "cid"),
            @Result(
                    property = "studentList",
                    column = "cid",
                    many = @Many(select = "edu.gdkm.dao.IStudentDao.queryStudentByCid")
            )
    })
    public Classes queryClassesById(Integer id);
}